3.8.9 \(\int \frac {A+B x}{x \sqrt {a^2+2 a b x+b^2 x^2}} \, dx\) [709]

Optimal. Leaf size=80 \[ \frac {A (a+b x) \log (x)}{a \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {(A b-a B) (a+b x) \log (a+b x)}{a b \sqrt {a^2+2 a b x+b^2 x^2}} \]

[Out]

A*(b*x+a)*ln(x)/a/((b*x+a)^2)^(1/2)-(A*b-B*a)*(b*x+a)*ln(b*x+a)/a/b/((b*x+a)^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 80, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {784, 78} \begin {gather*} \frac {A \log (x) (a+b x)}{a \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {(a+b x) (A b-a B) \log (a+b x)}{a b \sqrt {a^2+2 a b x+b^2 x^2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(A + B*x)/(x*Sqrt[a^2 + 2*a*b*x + b^2*x^2]),x]

[Out]

(A*(a + b*x)*Log[x])/(a*Sqrt[a^2 + 2*a*b*x + b^2*x^2]) - ((A*b - a*B)*(a + b*x)*Log[a + b*x])/(a*b*Sqrt[a^2 +
2*a*b*x + b^2*x^2])

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 784

Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dis
t[(a + b*x + c*x^2)^FracPart[p]/(c^IntPart[p]*(b/2 + c*x)^(2*FracPart[p])), Int[(d + e*x)^m*(f + g*x)*(b/2 + c
*x)^(2*p), x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && EqQ[b^2 - 4*a*c, 0]

Rubi steps

\begin {align*} \int \frac {A+B x}{x \sqrt {a^2+2 a b x+b^2 x^2}} \, dx &=\frac {\left (a b+b^2 x\right ) \int \frac {A+B x}{x \left (a b+b^2 x\right )} \, dx}{\sqrt {a^2+2 a b x+b^2 x^2}}\\ &=\frac {\left (a b+b^2 x\right ) \int \left (\frac {A}{a b x}+\frac {-A b+a B}{a b (a+b x)}\right ) \, dx}{\sqrt {a^2+2 a b x+b^2 x^2}}\\ &=\frac {A (a+b x) \log (x)}{a \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {(A b-a B) (a+b x) \log (a+b x)}{a b \sqrt {a^2+2 a b x+b^2 x^2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 44, normalized size = 0.55 \begin {gather*} \frac {(a+b x) (A b \log (x)+(-A b+a B) \log (a+b x))}{a b \sqrt {(a+b x)^2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x)/(x*Sqrt[a^2 + 2*a*b*x + b^2*x^2]),x]

[Out]

((a + b*x)*(A*b*Log[x] + (-(A*b) + a*B)*Log[a + b*x]))/(a*b*Sqrt[(a + b*x)^2])

________________________________________________________________________________________

Maple [A]
time = 0.49, size = 49, normalized size = 0.61

method result size
default \(-\frac {\left (b x +a \right ) \left (A \ln \left (b x +a \right ) b -A b \ln \left (x \right )-B \ln \left (b x +a \right ) a \right )}{\sqrt {\left (b x +a \right )^{2}}\, a b}\) \(49\)
risch \(\frac {\sqrt {\left (b x +a \right )^{2}}\, A \ln \left (-x \right )}{\left (b x +a \right ) a}-\frac {\sqrt {\left (b x +a \right )^{2}}\, \left (A b -B a \right ) \ln \left (b x +a \right )}{\left (b x +a \right ) a b}\) \(65\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)/x/((b*x+a)^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-(b*x+a)*(A*ln(b*x+a)*b-A*b*ln(x)-B*ln(b*x+a)*a)/((b*x+a)^2)^(1/2)/a/b

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 53, normalized size = 0.66 \begin {gather*} -\frac {\left (-1\right )^{2 \, a b x + 2 \, a^{2}} A \log \left (\frac {2 \, a b x}{{\left | x \right |}} + \frac {2 \, a^{2}}{{\left | x \right |}}\right )}{a} + \frac {B \log \left (x + \frac {a}{b}\right )}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x/((b*x+a)^2)^(1/2),x, algorithm="maxima")

[Out]

-(-1)^(2*a*b*x + 2*a^2)*A*log(2*a*b*x/abs(x) + 2*a^2/abs(x))/a + B*log(x + a/b)/b

________________________________________________________________________________________

Fricas [A]
time = 2.46, size = 28, normalized size = 0.35 \begin {gather*} \frac {A b \log \left (x\right ) + {\left (B a - A b\right )} \log \left (b x + a\right )}{a b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x/((b*x+a)^2)^(1/2),x, algorithm="fricas")

[Out]

(A*b*log(x) + (B*a - A*b)*log(b*x + a))/(a*b)

________________________________________________________________________________________

Sympy [A]
time = 0.22, size = 41, normalized size = 0.51 \begin {gather*} \frac {A \log {\left (x \right )}}{a} + \frac {\left (- A b + B a\right ) \log {\left (x + \frac {- A a + \frac {a \left (- A b + B a\right )}{b}}{- 2 A b + B a} \right )}}{a b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x/((b*x+a)**2)**(1/2),x)

[Out]

A*log(x)/a + (-A*b + B*a)*log(x + (-A*a + a*(-A*b + B*a)/b)/(-2*A*b + B*a))/(a*b)

________________________________________________________________________________________

Giac [A]
time = 1.45, size = 49, normalized size = 0.61 \begin {gather*} \frac {A \log \left ({\left | x \right |}\right ) \mathrm {sgn}\left (b x + a\right )}{a} + \frac {{\left (B a \mathrm {sgn}\left (b x + a\right ) - A b \mathrm {sgn}\left (b x + a\right )\right )} \log \left ({\left | b x + a \right |}\right )}{a b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x/((b*x+a)^2)^(1/2),x, algorithm="giac")

[Out]

A*log(abs(x))*sgn(b*x + a)/a + (B*a*sgn(b*x + a) - A*b*sgn(b*x + a))*log(abs(b*x + a))/(a*b)

________________________________________________________________________________________

Mupad [B]
time = 1.45, size = 68, normalized size = 0.85 \begin {gather*} \frac {B\,\ln \left (a+b\,x+\sqrt {{\left (a+b\,x\right )}^2}\right )}{b}-\frac {A\,\ln \left (a\,b+\frac {a^2}{x}+\frac {\sqrt {a^2}\,\sqrt {a^2+2\,a\,b\,x+b^2\,x^2}}{x}\right )}{\sqrt {a^2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*x)/(x*((a + b*x)^2)^(1/2)),x)

[Out]

(B*log(a + b*x + ((a + b*x)^2)^(1/2)))/b - (A*log(a*b + a^2/x + ((a^2)^(1/2)*(a^2 + b^2*x^2 + 2*a*b*x)^(1/2))/
x))/(a^2)^(1/2)

________________________________________________________________________________________